function Queue() {
  this.array = [];

  Queue.prototype.enqueue = element => {
    this.array.push(element);
  }

  Queue.prototype.dequeue = () => {
    return this.array.shift();
  }

  Queue.prototype.front = () => {
    return this.array[0];
  }

  Queue.prototype.isEmpty = () => {
    return this.array.length == 0
  }

  Queue.prototype.size = () => {
    return this.array.length
  }

  Queue.prototype.toString = () => {
    let result = ''
    for (let i = 0; i < this.size(); i++) {
      result += this.array[i] + ' '
    }
    return result
  }

  //返回数组的函数
  Queue.prototype.listShow = () => {
    return this.array
  }
}